package com.example.photoview;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.photoview.util.BaseActivity;
import com.example.photoview.util.LogUtil;

public class MainActivity extends BaseActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Button btn1 = (Button) findViewById(R.id.btn1);
        btn1.setOnClickListener(this);
        Button btn2 = (Button) findViewById(R.id.btn2);
        btn2.setOnClickListener(this);
        Button btn3 = (Button) findViewById(R.id.btn3);
        btn3.setOnClickListener(this);
        Button btn4 = (Button) findViewById(R.id.btn4);
        btn4.setOnClickListener(this);
        Button btn5 = (Button) findViewById(R.id.btn5);
        btn5.setOnClickListener(this);
        Button btn6 = (Button) findViewById(R.id.btn6);
        btn6.setOnClickListener(this);
        Button btn7 = (Button) findViewById(R.id.btn7);
        btn7.setOnClickListener(this);
        Button btn8 = (Button) findViewById(R.id.btn8);
        btn8.setOnClickListener(this);
        Button btn9 = (Button) findViewById(R.id.btn9);
        btn9.setOnClickListener(this);


    }

    @Override
    public void onClick(View v) {

        Intent intent = null;
        switch (v.getId()){
            case R.id.btn1:
                LogUtil.d("我是"+R.id.btn1);
                intent = new Intent(MainActivity.this ,ImageViewDemo.class);
                startActivity(intent);
                break;
            case R.id.btn2:
                LogUtil.d("我是"+R.id.btn2);
                intent = new Intent(MainActivity.this ,WebViewDemo.class);
                startActivity(intent);
                break;
            case R.id.btn3:

                break;
            case R.id.btn4:

                break;
            case R.id.btn5:

                break;
            case R.id.btn6:

                break;
            case R.id.btn7:

                break;
            case R.id.btn8:

                break;
            case R.id.btn9:

                break;
            default:
                break;
        }
    }
}
